package api.homework03;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class ArrayAndList {
    public static void main(String[] args) {
        String[] str = {"1","2","3","4","5"};

        Collection<String> c = Arrays.asList(str);
        System.out.println(c);

        Collection<String> cc = new ArrayList<>();
        cc.add("1");
        cc.add("2");
        cc.add("3");
        cc.add("4");
        cc.add("5");
        String[] s = cc.toArray(new String[1]);
        System.out.println(Arrays.toString(s));

    }
}
